/* 表格样式 */

.bootstrap-table {
    border: 0px;

    .table {
        padding: 0 !important;
        border-collapse: separate !important;
        border: none;

        thead {
            background-color: $table-thead-bg-color;
        }

        >thead>tr>th {
            font-weight: normal;
            border-radius: 0;
            border-style: solid;
            border-color: $table-border-color;
            border-width: 0 0 1px 0;
            vertical-align: bottom;
            font-size: 13px;
            white-space: nowrap;
            padding: 4px 0;
        }

        >thead>tr>td,
        >tbody>tr>td,
        >tfoot>tr>td {
            white-space: nowrap;
            border-style: solid;
            border-color: $table-border-color;
            border-width: 0 0 1px 0;
            font-size: 13px;
            line-height: 1.5;
            vertical-align: middle;
        }

        &.table-striped {
            >tbody {
                >tr:nth-of-type(odd) {
                    background-color: $table-striped-odd-bg;
                }

                >tr:nth-of-type(even) {
                    background-color: $table-striped-odd-even;
                }
            }
        }

        &.table-bordered {

            >thead>tr>th,
            >thead>tr>td,
            >tbody>tr>td,
            >tfoot>tr>td {
                border-style: solid;
                border-color: $table-border-color;
                border-width: 1px;
                border-collapse: collapse;

            }
        }

        >tbody>tr:hover {
            background-color: $table-tr-hover-bg !important;
        }

        .card-views {
            .card-view {
                line-height: 2;
            }
        }
    }


    .fixed-table-container {
        border: none !important;

        .table tbody tr.selected td {
            color: $table-select-color;
            background-color: $table-tr-selected-bg;
        }
    }


}

.table-toolbar-hide .fixed-table-toolbar {
    display: none;
}

.table-sort-input {
    outline: none;
    border: 1px solid #efefef;
    border-radius: 4px;
    width: 50px;
    line-height: 22px;
    text-align: center;

    &:focus,
    &:active {
        border: 1px solid $base-primary;
    }
}


/*表格列浮动样式*/
.bootstrap-table {

    .fixed-columns,
    .fixed-columns-right {
        position: absolute;
        top: 0;
        height: 100%;
        background-color: $table-fix-columns-bg;
        box-sizing: border-box;
        z-index: 1;
        border-style: solid;
        border-color: $table-border-color;
    }

    .fixed-columns {
        left: 0;
        border-width: 0 1px 0 0;

    }

    .fixed-columns .fixed-table-body {
        overflow: hidden !important
    }

    .fixed-columns-right {
        right: 0;
        border-width: 0 0 0 1px;
    }

    .fixed-columns-right .fixed-table-body {
        overflow-x: hidden !important
    }


    .reorder_rows_onDragClass td {
        color: $table-drag-rows-color !important;
        background-color: $table-drag-rows-bg !important;
        box-shadow: 4px 5px 4px $table-drag-colunm-shadow-color outset;
    }


    .dragtable-sortable {
        list-style-type: none;
        margin: 0;
        padding: 0;
        user-select: none
    }

    .dragtable-sortable li {
        margin: 0;
        padding: 0;
        float: left;
        font-size: 1em;
        background: $table-drag-colunm-bg;
    }

    .dragtable-sortable th,
    .dragtable-sortable td {
        border-left: 0
    }

    .ui-sortable-helper {
        opacity: .7;
        filter: alpha(opacity=70)
    }

    .ui-sortable-placeholder {
        -moz-box-shadow: 4px 5px 4px $table-drag-colunm-shadow-color inset;
        -webkit-box-shadow: 4px 5px 4px $table-drag-colunm-shadow-color inset;
        box-shadow: 4px 5px 4px $table-drag-colunm-shadow-color inset;
        visibility: visible !important;
    }

    .ui-sortable-placeholder * {
        opacity: .0;
        visibility: hidden
    }

    .rc-handle-container {
        position: relative;
    }

    .rc-handle {
        position: absolute;
        width: 7px;
        cursor: ew-resize;
        margin-left: -3px;
        z-index: 2
    }
}


table.rc-table-resizing {
    cursor: ew-resize
}

table.rc-table-resizing thead,
table.rc-table-resizing thead>th,
table.rc-table-resizing thead>th>a {
    cursor: ew-resize
}

.table.table-head {
    thead {
        background-color: $table-thead-bg-color;

        >tr>th {
            font-weight: normal;
            padding: 0.75rem;
        }
    }
}

table {
    &.table-info-view {
        width: 100%;
        table-layout: fixed;
        margin: 0;
        border-left: 1px solid $table-border-color;
        border-right: 1px solid $table-border-color;

        tr {
            th {
                font-weight: normal;
                width: 150px;
                text-align: right;
                background-color: $table-thead-bg-color;
            }

            td {
                word-break: break-all;
            }

            &:first-child {

                th,
                td {
                    border-top: 1px solid $table-border-color;
                }
            }
        }
    }
}